package com.quanyan.common.utils;

import com.mongodb.BasicDBObject;

public class CleanBasicDBObject extends BasicDBObject {
    /**
     *
     */
    private static final long serialVersionUID = 2191412219444072914L;

    @Override
    public BasicDBObject append(String key, Object val) {
        if (val == null) {
            return null;
        }
        return super.append(key, val);
    }

    @Override
    public Object put(String key, Object val) {
        if (val == null) {
            return this;
        }
        return super.put(key, val);
    }
}
